<include file="public@header" />
</head>
<body>
<div class="wrap">
	<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('set_yunying')}">

		<div>
			<dl>
				<dt></dt>
				<dd>
					<table class="table table-hover table-bordered">
						<tr>
							<td>资料名称</td>
							<td>上传人</td>
							<td>资料类型</td>
							<td>上传时间</td>
							<td>资料下载</td>
						</tr>
						<volist name="files" id="vo">
							<tr>
								<td>{$vo.file_name}</td>
								<td>{$vo.user_nickname}</td>
								<td>
									<switch name="vo.type">
										<case value="3">
											立项资料
										</case>
										<case value="4">
											落定资料
										</case>
										<case value="5">
											变更资料
										</case>
										<case value="6">
											凭证资料
										</case>
										<case value="7">
											完成资料
										</case>
									</switch>
								</td>
								<td>{$vo.create_time|date="Y-m-d",###}</td>
								<td><a href="{$vo.file|cmf_get_file_download_url}">下载</a></td>
							</tr>
							</switch>
						</volist>
					</table>
				</dd>
			</dl>
		</div>
		<div class="form-group">
			<label for="input-yunying" class="col-sm-2 control-label">运营人员</label>
			<div class="col-md-6 col-sm-10">
				<input class="form-control" type="text" style="width:400px;" value="{$project.yunyinguser.user_nickname|default=''}"
					   placeholder="请选择运营人员" onclick="doSelectLayer(this);"
					   data-url="{:url('user/select',['type' => 6])}" data-id="input-yunying" name="layer_temp[1]"
					   readonly/>
				<input class="form-control" type="hidden" value="{$project.yunying}" name="yunying"
					   id="input-yunying"/>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-sm-10">
				<input type="hidden" name="pid" value="{$project.id}"/>
				<button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
			</div>
		</div>
	</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/html" id="files-item-tpl">
	<li id="saved-file{id}">
		<input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
		<div class="input-group">
			<span class="input-group-addon">文件名称</span>
			<input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
				   style="width: 200px;" title="文件名称">
			<span class="input-group-addon btn btn-success" onclick="javascript:uploadOne('图片上传','#file-{id}','file');">替换</span>
			<span class="input-group-addon btn btn-warning" onclick="javascript:(function(){$('#saved-file{id}').remove();})();">移除</span>
		</div>
	</li>
</script>
</body>
</html>